<p id="notice"><%= notice %></p>

<p>
  <b>Date:</b>
  <%= @registration.timeslot.start_time.to_date.to_s(:rfc822) %>
</p>

<p>
  <b>Start time:</b>
  <%= @registration.timeslot.start_time.to_s(:time) %>
</p>

<p>
  <b>End time:</b>
  <%= @registration.timeslot.end_time.to_s(:time) %>
</p>

<p>
  <b>Student:</b>
  <%= link_to @registration.student.full_name, @registration.student %>
</p>

<p>
  <b>Instructor:</b>
  <%= link_to @registration.timeslot.instructor.full_name, @registration.timeslot.instructor %>
</p>

<p>
  <b>Register time:</b>
  <%= @registration.register_time.to_s(:long) %>
</p>

<% unless @registration.cancel_time.nil? %>
<p>
  <b>Cancel time:</b>
  <%= @registration.cancel_time.to_s(:long) %>
</p>
<% end %>

<% if @current_user.student? %>
<%= link_to 'Cancel registration', timeslot_registration_path(@registration.timeslot, @registration), confirm: 'Are you sure?', method: :delete %>
<% end %>
